package com.star.caffeine.controller;


import com.star.caffeine.model.UserVO;
import com.star.caffeine.service.UserCache;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: 整合spring-cache测试
 * @author: star
 * @create: 2025-04-23 17:38
 **/

@RestController
@RequestMapping("/cacheable")
public class CacheableController {

    @Autowired
    private UserCache userCache;

    @RequestMapping("/get")
    public UserVO get(String name) {
        return userCache.getUser(name);
    }


}
